
/*

DEPENDENCIES:
-------------
(none)
-------------


IN THIS FILE:
-------------
ext.map
-------------

*/

Gimme.ext.map = function()
{
	return typeof Array.prototype.map !== 'undefined' ? native_map : custom_map;
	
	function native_map(fn, thisObject)
	{
		return Gimme(this.entities().map(fn, thisObject));
	}
	
	function custom_map(fn, thisObject)
	{
		var gim = Gimme();
		var i = this.length;
		while (i--)
		{
			gim.unshift(fn.call(thisObject, this[i]));
		}
		return gim;
	}
}();